<template>
  <branch-list
    v-if="currPage == 'branch'"
    @toDetails="onToDetails"
  ></branch-list>
  <branch-staff
    v-if="currPage == 'staff'"
    :record="record"
    @back="currPage = 'branch'"
  ></branch-staff>
</template>

<script setup>
import BranchList from "./BranchList.vue";
import BranchStaff from "./BranchStaff.vue";
import { ref } from "vue";

const currPage = ref("branch");
const record = ref({});
const onToDetails = (rec) => {
  record.value = rec;
  currPage.value = "staff";
};
</script>

<style scoped>
</style>